package com.pkuse.bjousystem.utils;

import java.util.Calendar;

public class DateUtils {

    public static void main(String[] args) {
        System.out.println(DateUtils.thisYear());
    }

    public static String thisYear() {
        //处理当前时间
        Calendar calendar = Calendar.getInstance();
        int currentMonth = calendar.get(Calendar.MONTH) + 1;
        int month = currentMonth >= 7 ? 7 : 1;
        return String.format("%4d-%02d-01", calendar.get(Calendar.YEAR), month);
    }
}
